package com.avocado.base.validator.user;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;


@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = UserAddNameValidator.class)
public @interface UserAddNameValidation {

    String message() default "用户名已经存在，请使用其它用户名！";
    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};

}
